package com.lantosec.hmrp.modules.sysdata.vo;

import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.sysdata.entity.SysModelForm;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * <p>
 * 流程模型与表单的关系表 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-03-10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="SysModelForm对象", description="流程模型与表单的关系表")
public class SysModelFormVO extends BaseVO<SysModelForm> {
    private static final long serialVersionUID = 1L;


    public SysModelFormVO(SysModelForm entity){
        this.modelFormId = entity.getModelFormId();
        this.processName = entity.getProcessName();
        this.processType = entity.getProcessType();
        this.modelId = entity.getModelId();
        this.formTableId = entity.getFormTableId();
        this.startLayoutId = entity.getStartLayoutId();
        this.startTaskId = entity.getStartTaskId();
        this.createTime = entity.getCreateTime();
        this.editTime = entity.getEditTime();
        this.flag = entity.getFlag();
        this.proInsNameRule = entity.getProInsNameRule();
    }

    @Override
    public SysModelForm convertToEntity(){
        return new SysModelForm(this);
    }


    @ApiModelProperty(value = "ID")
    private String modelFormId;

    @ApiModelProperty(value = "流程模型名称")
    private String processName;

    @ApiModelProperty(value = "流程分类，对应数据字典表ID")
    private String processType;

    @ApiModelProperty(value = "流程模型ID")
    private String modelId;

    @ApiModelProperty(value = "表单ID")
    private String formTableId;

    @ApiModelProperty(value = "流程开始表单布局Id")
    private String startLayoutId;

    @ApiModelProperty(value = "流程开始任务节点Id")
    private String startTaskId;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "最后编辑时间")
    private Date editTime;

    @ApiModelProperty(value = "流程实例名称规则")
    private String proInsNameRule;

    /**
     * 逻辑删除标识
     */
    private int flag;
}
